# 列表生成式
# 基本语法 list = [表达式 for 变量 in 列表]
# ele * 2 for ele in range(1,5)  ==> [2,4,6,8]
list = [ele * 2 for ele in range(1, 5)]
print(list)

list1 = [ele + ele for ele in "你好啊"]
print(list1)


# 要生成一个 [1,4,9,16,25,36,49,64,81,100] 就是 1的平方 到 10的平方
list2 = [ele ** 2 for ele in range(1, 11)]
print(list2)
